<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2021/12/31
  Time: 10:44
  To change this template use File | Settings | File Templates.
--%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<html>
<head>
    <base href="<%=basePath%>"/>
    <title>Title</title>
</head>
<body>
<center><h1>权限修改</h1>
    <hr>
    <form action="<%=basePath%>sysPermissionController/update" method="post">
        <input type="hidden" name="permissionIdSTR" value="${sysPermission_db.permissionName}">
        <table>
            <tr>
                <td>父ID：</td>
                <td>
                    <select name="pIdSTR">
                        <option>---------请选择父级节点---------</option>
                        <c:forEach items="${sysPermissionList_db}" var="sysPermission">
                            <c:if test="${sysPermission.permissionId==sysPermission_db.pId}">
                                <option id="${sysPermission.permissionId}" value="${sysPermission.permissionId}" selected="selected">${sysPermission.permissionName}</option>
                            </c:if>
                            <c:if test="${sysPermission.permissionId!=sysPermission_db.pId}">
                                <option id="${sysPermission.permissionId}" value="${sysPermission.permissionId}">${sysPermission.permissionName}</option>
                            </c:if>
                        </c:forEach>

                    </select>
                </td>
            </tr>
            <tr>
                <td>权限名称：</td>
                <td><input type="text" name="permissionName" value="${sysPermission_db.permissionName}"></td>
            </tr>
            <tr>
                <td>权限编码：</td>
                <td><input type="text" name="permissionCode" value="${sysPermission_db.permissionCode}"></td>
            </tr>
            <tr>
                <td>图标：</td>
                <td><input type="text" name="icon" value="${sysPermission_db.icon}"></td>
            </tr>
            <tr>
                <td>URL：</td>
                <td><input type="text" name="url" value="${sysPermission_db.url}"></td>
            </tr>
            <tr>
                <td>类型：</td>
                <td><input type="text" name="type" value="${sysPermission_db.type}"></td>
            </tr>
            <tr>
                <td>状态：</td>
                <td><input type="text" name="state" value="${sysPermission_db.state}"></td>
            </tr>

            <tr>
                <td><input type="submit" value="修改"></td>
                <td></td>
            </tr>
        </table>
    </form>
</center>
</body>
</html>
